package d0325;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class TestSimpleDateFormat {
    public static void main(String[] args) {
        SimpleDateFormat sdf1 = new SimpleDateFormat("yyy年MM月dd日");
        SimpleDateFormat sdf2 = new SimpleDateFormat("yyy/MM/dd hh:mm:ss");

        Date date = new Date();
        System.out.println(sdf1.format(date));
        System.out.println(sdf2.format(date));
        Calendar calendar = Calendar.getInstance();
        calendar.set(2020,2,31,10,23,45);
        System.out.println(sdf1.format(calendar.getTime()));
        System.out.println(sdf2.format(calendar.getTime()));
    }
}